home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / protocol / standard / scsi / scsi1_do.3 < prev    next >
Internet Message Format  |  1993-07-14  |  66KB

  1. From coffin@ROCKY2.ROCKEFELLER.EDU Thu Mar 22 08:07:13 1990
  2. Flags: 000000000001
  3. Return-Path: <coffin@ROCKY2.ROCKEFELLER.EDU>
  4. Received: from ROCKY2.ROCKEFELLER.EDU by rascal.ics.utexas.edu. (4.0/SMI-4.0)
  5.     id AA28411; Thu, 22 Mar 90 08:07:02 CST
  6. Received: by ROCKY2.ROCKEFELLER.EDU (5.61/1.34)
  7.     id AA14719; Thu, 22 Mar 90 09:07:14 -0500
  8. Message-Id: <9003221407.AA14719@ROCKY2.ROCKEFELLER.EDU>
  9. To: werner@rascal.ics.utexas.edu
  10. Subject: scsiDocs-Part 3 of 7
  11. Date: Thu, 22 Mar 90 09:06:59 -0500
  12. From: coffin@ROCKY2.ROCKEFELLER.EDU
  13.  
  14.  
  15. .fo Section 7                            #
  16. 7. Command Descriptions for All Device Types
  17.  
  18. 7.1 Group 0 Commands for All Device Types.  These commands shall be as listed 
  19. in Table 7-1.
  20.  
  21.                                   Table 7-1
  22.                  Group 0 Common Commands for All Device Types
  23.  
  24. ==============================================================================
  25. Operation
  26.   Code      Type   Command Name                       Section
  27. ------------------------------------------------------------------------------
  28.    00H       O     TEST UNIT READY                    7.1.1
  29.    01H       *
  30.    02H       V
  31.    03H       M     REQUEST SENSE                      7.1.2
  32.    04H       *
  33.    05H       *
  34.    06H       V
  35.    07H       *
  36.    08H       *
  37.    09H       V
  38.    0AH       *
  39.    0BH       *
  40.    0CH       V
  41.    0DH       V
  42.    0EH       V
  43.    0FH       *
  44.    10H       *
  45.    11H       *
  46.    12H       E     INQUIRY                            7.1.3
  47.    13H       *
  48.    14H       *
  49.    15H       *
  50.    16H       *
  51.    17H       *
  52.    18H       O     COPY                               7.1.4
  53.    19H       *
  54.    1AH       *
  55.    1BH       *
  56.    1CH       O     RECEIVE DIAGNOSTIC RESULTS         7.1.5
  57.    1DH       O     SEND DIAGNOSTIC                    7.1.6
  58.    1EH       *
  59.    1FH       R
  60. ==============================================================================
  61.  
  62. Key: M  =  Command implementation is mandatory.
  63.      E  =  Command implementation is required for SCSI devices that support 
  64.            device-independent self-configuring software.
  65.      O  =  Command implementation is optional.
  66.      R  =  Operation code is reserved for future standardization.
  67.      V  =  Operation code is available for vendor unique commands.
  68.      *  =  These operation codes may have different meanings for specific 
  69.            types of peripheral devices.  (See the appropriate section for 
  70.            further information.)
  71. .pa
  72.  
  73.   7.1.1 TEST UNIT READY Command
  74.  
  75.      Peripheral Device Type:  All
  76.         Operation Code Type:  Optional
  77.              Operation Code:  00H
  78.  
  79.                                   Table 7-2
  80.                            TEST UNIT READY Command
  81.  
  82. ==============================================================================
  83.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  84. Byte |        |        |        |        |        |        |        |        |
  85. ==============================================================================
  86.  0   |                           Operation Code                              | 
  87. -----|-----------------------------------------------------------------------|
  88.  1   | Logical Unit Number      |                  Reserved                  |
  89. -----|-----------------------------------------------------------------------|
  90.  2   |                           Reserved                                    |
  91. -----|-----------------------------------------------------------------------|
  92.  3   |                           Reserved                                    |
  93. -----|-----------------------------------------------------------------------|
  94.  4   |                           Reserved                                    |
  95. -----|-----------------------------------------------------------------------|
  96.  5   | Vendor Unique   |         Reserved                  |  Flag  |  Link  |
  97. ==============================================================================
  98.  
  99.   The TEST UNIT READY command (Table 7-2) provides a means to check if the 
  100. logical unit is ready.  This is not a request for a self test.  If the logical 
  101. unit would accept an appropriate medium-access command without returning CHECK 
  102. CONDITION status, this command shall return a GOOD status.
  103.  
  104.   7.1.2 REQUEST SENSE Command
  105.  
  106.      Peripheral Device Type:  All
  107.         Operation Code Type:  Mandatory
  108.              Operation Code:  03H
  109.  
  110.                                   Table 7-3
  111.                             REQUEST SENSE Command
  112.  
  113. ==============================================================================
  114.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  115. Byte |        |        |        |        |        |        |        |        |
  116. ==============================================================================
  117.  0   |                           Operation Code                              | 
  118. -----|-----------------------------------------------------------------------|
  119.  1   | Logical Unit Number      |                  Reserved                  |
  120. -----|-----------------------------------------------------------------------|
  121.  2   |                           Reserved                                    |
  122. -----|-----------------------------------------------------------------------|
  123.  3   |                           Reserved                                    |
  124. -----|-----------------------------------------------------------------------|
  125.  4   |                           Allocation Length                           |
  126. -----|-----------------------------------------------------------------------|
  127.  5   | Vendor Unique   |         Reserved                  |  Flag  |  Link  |
  128. ==============================================================================
  129.  
  130.   The REQUEST SENSE command (Table 7-3) requests that the target transfer 
  131. sense data to the initiator.
  132.  
  133.   The sense data shall be valid for a CHECK CONDITION status returned on the 
  134. prior command.  This sense data shall be preserved by the target for the 
  135. initiator until retrieved by the REQUEST SENSE command or until the receipt of 
  136. any other command for the same logical unit from the initiator that issued the 
  137. command resulting in the CHECK CONDITION status.  Sense data shall be cleared 
  138. upon receipt of any subsequent command to the logical unit from the initiator 
  139. receiving the CHECK CONDITION status.  In the case of the single initiator 
  140. option (see 5.1.3.4), the target shall assume that the REQUEST SENSE command 
  141. is from the same initiator.
  142.  
  143.   The allocation length specifies the number of bytes that the initiator has 
  144. allocated for returned sense data.  An allocation length of zero indicates 
  145. that four bytes of sense data shall be transferred.  Any other value indicates 
  146. the maximum number of bytes that shall be transferred.  The target shall 
  147. terminate the DATA IN phase when allocation length bytes have been transferred 
  148. or when all available sense data have been transferred to the initiator, 
  149. whichever is less.
  150.  
  151.   The REQUEST SENSE command shall return the CHECK CONDITION status only to 
  152. report fatal errors for the REQUEST SENSE command.  For example:
  153.  
  154.   (1) The target receives a nonzero reserved bit in the command descriptor 
  155. block.
  156.   (2) An unrecovered parity error occurs on the DATA BUS. 
  157.   (3) A target malfunction prevents return of the sense data.
  158.  
  159. If any nonfatal error occurs during the execution of the REQUEST SENSE 
  160. command, the target shall return the sense data with GOOD status.
  161.  
  162.   Following a fatal error on a REQUEST SENSE command, sense data may be 
  163. invalid. 
  164.  
  165.   A target may implement the nonextended, the extended, or both sense data 
  166. formats.  (Implementors note:  Targets that implement both sense data formats 
  167. may select the nonextended sense data format in response to an allocation 
  168. length of zero.  Other methods of selection are also feasible.)
  169.  
  170.      7.1.2.1 Nonextended Sense.  The format of the sense data is determined by 
  171. the error class.   Error classes 0 through 6 use the nonextended sense data 
  172. format (Table 7-4).  Error class 7 is described in Section 7.1.2.2.
  173. .pa
  174.  
  175.                                   Table 7-4
  176.                         Nonextended Sense Data Format
  177.  
  178. ==============================================================================
  179.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  180. Byte |        |        |        |        |        |        |        |        |
  181. ==============================================================================
  182.  0   | AdValid|        Error Class       |        Error Code                 |
  183. -----|-----------------------------------------------------------------------|
  184.  1   | Vendor Unique            |Logical Block Address (MSB)                 |
  185. -----|-----------------------------------------------------------------------|
  186.  2   |                           Logical Block Address                       |
  187. -----|-----------------------------------------------------------------------|
  188.  3   |                           Logical Block Address (LSB)                 |
  189. ==============================================================================
  190.  
  191.   The address valid (AdValid) bit indicates that the logical block address 
  192. field contains valid information related to the error code.
  193.  
  194.   The error class specifies a class of errors with error classes 0 through 6 
  195. being vendor unique.  For these classes, the error code is vendor unique.
  196.  
  197.      7.1.2.2 Extended Sense.  Error class 7 specifies extended sense.  Error 
  198. code zero specifies the extended sense data format.  Error code FH specifies a 
  199. vendor unique data format for extended sense.  Error codes 1H through EH are 
  200. reserved.
  201.  
  202.   The extended sense data format is shown in Table 7-5.
  203.  
  204.                                   Table 7-5
  205.                           Extended Sense Data Format
  206.  
  207. ==============================================================================
  208.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  209. Byte |        |        |        |        |        |        |        |        |
  210. ==============================================================================
  211.  0   | Valid  |   Error Class (7)        |         Error Code (0)            |
  212. -----|-----------------------------------------------------------------------|
  213.  1   |                           Segment Number                              |
  214. -----|-----------------------------------------------------------------------|
  215.  2   |Filemark|  EOM   |  ILI   |Reserved|         Sense Key                 |
  216. -----|-----------------------------------------------------------------------|
  217.  3   |                           Information Byte (MSB)                      |
  218. -----|-----------------------------------------------------------------------|
  219.  4   |                           Information Byte                            |
  220. -----|-----------------------------------------------------------------------|
  221.  5   |                           Information Byte                            |
  222. -----|-----------------------------------------------------------------------|
  223.  6   |                           Information Byte (LSB)                      |
  224. -----|-----------------------------------------------------------------------|
  225.  7   |                           Additional Sense Length (n)                 |
  226. -----|-----------------------------------------------------------------------|
  227.  8 _ |                           Additional Sense Bytes                      |
  228.  n+7 |                                                                       |
  229. ==============================================================================
  230.  
  231.  
  232.   The information bytes are not defined if the valid bit is zero.  If the 
  233. valid bit is one, the information bytes contain valid information as follows:
  234.  
  235.   (1) The unsigned logical block address associated with the sense key, for 
  236. direct-access devices (Type 0), write-once read-multiple devices (Type 4), and 
  237. read-only direct-access devices (Type 5).
  238.  
  239.   (2) The difference (residue) of the requested length minus the actual length 
  240. in either bytes or blocks, as determined by the command, for sequential-access 
  241. devices (Type 1), printer devices (Type 2), and processor devices (Type 3).  
  242. (Negative values are indicated by two's complement notation.)
  243.  
  244.   (3) The difference (residue) of the requested number of blocks minus the
  245. actual number of blocks copied or compared for the current segment descriptor 
  246. of a COPY, COMPARE, or COPY AND VERIFY command.
  247.  
  248.   The segment number contains the number of the current segment descriptor if 
  249. the extended sense is in response to a COPY, COMPARE, or COPY AND VERIFY 
  250. command.  Up to 256 segments are supported beginning with segment zero.
  251.  
  252.   The filemark bit indicates that the current command has read a filemark.  
  253. This bit is only used for sequential-access devices.
  254.  
  255.   The end-of-medium (EOM) bit indicates that an end-of-medium condition (end-
  256. of-tape, beginning-of-tape, out-of-paper, etc) exists on a sequential access 
  257. device or printer device.  For sequential-access devices, this bit indicates 
  258. that the unit is at or past the early-warning end-of-tape if the direction was 
  259. forward or that the command could not be completed because beginning-of-tape 
  260. was encountered if the direction was reverse.  Direct-access devices shall not 
  261. use this bit; instead, these devices shall report attempts to access beyond 
  262. the end-of-medium as ILLEGAL REQUEST sense key (see Table 7-6).
  263.  
  264.   The incorrect length indicator (ILI) bit indicates that the requested 
  265. logical block length did not match the logical block length of the data on the 
  266. medium.
  267.  
  268.   The sense keys are described in Tables 7-6 and 7-7.
  269.  
  270.   The additional sense length specifies the number of additional sense bytes 
  271. to follow.  If the allocation length of the command descriptor block is too 
  272. small to transfer all of the additional sense bytes, the additional sense 
  273. length is not adjusted to reflect the truncation.
  274.  
  275.   The additional sense bytes contain command-specific, peripheral-device-
  276. specific data, or both kinds of data that further define the nature of the 
  277. CHECK CONDITION status.  The COPY, COMPARE, COPY AND VERIFY, and SEARCH DATA 
  278. commands define a standard purpose for some of these bytes.  Except as 
  279. described in these commands, the additional sense bytes are vendor unique.
  280. .pa
  281.  
  282.                                   Table 7-6
  283.                         Sense Key (0H-7H) Descriptions
  284.  
  285. ==============================================================================
  286. Sense Key  Description
  287. ---------  -------------------------------------------------------------------
  288.    0H      NO SENSE.  Indicates that there is no specific sense key 
  289.            information to be reported for the designated logical unit.  This 
  290.            would be the case for a successful command or a command that 
  291.            received a CHECK CONDITION status because one of the filemark, EOM, 
  292.            or ILI bits is set to one.
  293.  
  294.    1H      RECOVERED ERROR.  Indicates that the last command completed 
  295.            successfully with some recovery action performed by the target.  
  296.            Details may be determinable by examining the additional sense bytes 
  297.            and the information bytes.
  298.  
  299.    2H      NOT READY.  Indicates that the logical unit addressed cannot be 
  300.            accessed.  Operator intervention may be required to correct this 
  301.            condition.
  302.  
  303.    3H      MEDIUM ERROR.  Indicates that the command terminated with a 
  304.            nonrecovered error condition that was probably caused by a flaw in 
  305.            the medium or an error in the recorded data.
  306.  
  307.    4H      HARDWARE ERROR.  Indicates that the target detected a 
  308.            nonrecoverable hardware failure (for example, controller failure, 
  309.            device failure, parity error, etc) while performing the command or 
  310.            during a self test.
  311.  
  312.    5H      ILLEGAL REQUEST.  Indicates that there was an illegal parameter in 
  313.            the command descriptor block or in the additional parameters 
  314.            supplied as data for some commands (FORMAT UNIT, SEARCH DATA, etc).  
  315.            If the target detects an invalid parameter in the command 
  316.            descriptor block, then it shall terminate the command without 
  317.            altering the medium.  If the target detects an invalid parameter in 
  318.            the additional parameters supplied as data, then the target may 
  319.            have already altered the medium.
  320.  
  321.    6H      UNIT ATTENTION.  Indicates that the removable medium may have been 
  322.            changed or the target has been reset.  See 6.1.3 for more detailed 
  323.            information about the unit attention condition.
  324.  
  325.    7H      DATA PROTECT.  Indicates that a command that reads or writes the 
  326.            medium was attempted on a block that is protected from this 
  327.            operation.  The read or write operation is not performed.
  328. ==============================================================================
  329. .pa
  330.  
  331.                                   Table 7-7
  332.                         Sense Key (8H-FH) Descriptions
  333.  
  334. ==============================================================================
  335. Sense Key  Description
  336. ---------  -------------------------------------------------------------------
  337.    8H      BLANK CHECK.  Indicates that a write-once read-multiple device or a 
  338.            sequential-access device encountered a blank block while reading or 
  339.            a write-once read-multiple device encountered a nonblank block 
  340.            while writing.
  341.  
  342.    9H      Vendor unique.  This sense key is available for reporting vendor 
  343.            unique conditions.
  344.  
  345.    AH      COPY ABORTED.  Indicates a COPY, COMPARE, or COPY AND VERIFY 
  346.            command was aborted due to an error condition on the source device, 
  347.            the destination device, or both.  (See 7.1.4.2 for additional 
  348.            information about this sense key.)
  349.  
  350.    BH      ABORTED COMMAND.  Indicates that the target aborted the command.  
  351.            The initiator may be able to recover by trying the command again.
  352.  
  353.    CH      EQUAL.  Indicates a SEARCH DATA command has satisfied an equal 
  354.            comparison.
  355.  
  356.    DH      VOLUME OVERFLOW.  Indicates that a buffered peripheral device has 
  357.            reached the end-of-medium and data remains in the buffer that has 
  358.            not been written to the medium.  A RECOVER BUFFERED DATA command(s) 
  359.            may be issued to read the unwritten data from the buffer.
  360.  
  361.    EH      MISCOMPARE.  Indicates that the source data did not match the data 
  362.            read from the medium.
  363.  
  364.    FH      This sense key is reserved.
  365. ==============================================================================
  366. .pa
  367.  
  368. 7.1.3 INQUIRY Command
  369.  
  370.      Peripheral Device Type:  All
  371.         Operation Code Type:  Extended
  372.              Operation Code:  12H
  373.  
  374.                                   Table 7-8
  375.                                INQUIRY Command
  376.  
  377. ==============================================================================
  378.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  379. Byte |        |        |        |        |        |        |        |        |
  380. ==============================================================================
  381.  0   |                           Operation Code                              | 
  382. -----|-----------------------------------------------------------------------|
  383.  1   | Logical Unit Number      |                  Reserved                  |
  384. -----|-----------------------------------------------------------------------|
  385.  2   |                           Reserved                                    |
  386. -----|-----------------------------------------------------------------------|
  387.  3   |                           Reserved                                    |
  388. -----|-----------------------------------------------------------------------|
  389.  4   |                           Allocation Length                           |
  390. -----|-----------------------------------------------------------------------|
  391.  5   | Vendor Unique   |         Reserved                  |  Flag  |  Link  |
  392. ==============================================================================
  393.  
  394.   The INQUIRY command (Table 7-8) requests that information regarding 
  395. parameters of the target and its attached peripheral device(s) be sent to the 
  396. initiator.
  397.  
  398.   The allocation length specifies the number of bytes that the initiator has 
  399. allocated for returned INQUIRY data.  An allocation length of zero indicates 
  400. that no INQUIRY data shall be transferred.  This condition shall not be 
  401. considered as an error.  Any other value indicates the maximum number of bytes 
  402. that shall be transferred.  The target shall terminate the DATA IN phase when 
  403. allocation length bytes have been transferred or when all available INQUIRY 
  404. data have been transferred to the initiator, whichever is less.
  405.  
  406.   The INQUIRY command shall return a CHECK CONDITION status only when the 
  407. target cannot return the requested INQUIRY data.  (Implementors note:  It is 
  408. recommended that the INQUIRY data be returned even though the peripheral 
  409. device may not be ready for other commands.)
  410.  
  411.   If an INQUIRY command is received from an initiator with a pending unit 
  412. attention condition (before the target reports CHECK CONDITION status), the 
  413. target shall perform the INQUIRY command and shall not clear the unit 
  414. attention condition.  (See 6.1.3.)
  415.  
  416.   The INQUIRY data (Table 7-9) contains a five byte header, followed by the 
  417. vendor unique parameters, if any.
  418. .pa
  419.  
  420.                                   Table 7-9
  421.                                  INQUIRY Data
  422.  
  423. ==============================================================================
  424.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  425. Byte |        |        |        |        |        |        |        |        |
  426. ==============================================================================
  427.  0   |                           Peripheral Device Type                      | 
  428. -----|-----------------------------------------------------------------------|
  429.  1   |  RMB   |                  Device-Type Qualifier                       |
  430. -----|-----------------------------------------------------------------------|
  431.  2   |   ISO Version   |       ECMA Version       |       ANSI Version       |
  432. -----|-----------------------------------------------------------------------|
  433.  3   |                           Reserved                                    |
  434. -----|-----------------------------------------------------------------------|
  435.  4   |                           Additional Length (n)                       |
  436. ==============================================================================
  437.      |                       Vendor Unique Parameters                        |
  438. ==============================================================================
  439. 5 _  |                           Vendor Unique                               |
  440. n+4  |                           Parameter Bytes                             |
  441. ==============================================================================
  442.  
  443. The peripheral device type is shown in Table 7-10.
  444.  
  445.                                   Table 7-10
  446.                             Peripheral Device Type
  447.  
  448. ==============================================================================
  449.   Code         Description
  450. ------------------------------------------------------------------------------
  451.   00H          Direct-access device (e.g., magnetic disk)
  452.   01H          Sequential-access device (e.g., magnetic tape)
  453.   02H          Printer device
  454.   03H          Processor device
  455.   04H          Write-once read-multiple device (e.g., some optical disks)
  456.   05H          Read-only direct-access device (e.g., some optical disks)
  457.   06H _ 7EH    Reserved
  458.   7FH          Logical unit not present
  459.   80H _ FFH    Vendor unique
  460. ==============================================================================
  461.  
  462.   A removable medium (RMB) bit of zero indicates that the medium is not 
  463. removable.  A RMB bit of one indicates that the medium is removable.
  464.  
  465.   The device-type qualifier is a seven bit user specified code.  This code may 
  466. be set with switches or by some other means by the target or peripheral 
  467. device.   SCSI devices that do not support this feature shall return all zero 
  468. bits.  This feature allows each user to assign unique codes to each specific 
  469. type of peripheral device that is supported on the system being used.  These 
  470. codes may then be used by self-configuring software to determine what specific 
  471. peripheral device is at each logical unit number.  This is especially valuable 
  472. for systems that support multiple types of removable medium.
  473.  
  474.   The usage of nonzero code values in the ISO version and ECMA version fields 
  475. are defined by the International Standards Organization and the European 
  476.  
  477. Computer Manufacturers Association, respectively.  A zero code value in these 
  478. fields shall indicate that the target does not claim compliance to the ISO or 
  479. ECMA versions of SCSI.  Note that it is possible to claim compliance to more 
  480. than one of these SCSI standards.
  481.  
  482.   The ANSI version indicates the implemented version of this standard and is 
  483. defined as shown in Table 7-11.
  484.  
  485.                                   Table 7-11
  486.                                  ANSI Version
  487.  
  488. ==============================================================================
  489.   Code        Description
  490. ------------------------------------------------------------------------------
  491.    0H         Version is unspecified.  (Use this code if you are implementing 
  492.               to this document - it is not published, yet.)
  493.    1H         This version.  This code shall be used by SCSI devices that 
  494.               claim to comply with this standard (upon ANSI publication)
  495.    2H _ 7H    Reserved
  496. ==============================================================================
  497.  
  498.   The additional length shall specify the length in bytes of the vendor unique 
  499. parameters.  If the allocation length of the command descriptor block is too 
  500. small to transfer all of the vendor unique parameters, the additional length 
  501. shall not be adjusted to reflect the truncation.
  502.  
  503.   7.1.4 COPY Command
  504.  
  505.      Peripheral Device Type:  All
  506.         Operation Code Type:  Optional
  507.              Operation Code:  18H
  508.  
  509.                                   Table 7-12
  510.                                  COPY Command
  511.  
  512. ==============================================================================
  513.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  514. Byte |        |        |        |        |        |        |        |        |
  515. ==============================================================================
  516.  0   |                           Operation Code                              | 
  517. -----|-----------------------------------------------------------------------|
  518.  1   | Logical Unit Number      |                  Reserved                  |
  519. -----|-----------------------------------------------------------------------|
  520.  2   |                           Parameter List Length (MSB)                 |
  521. -----|-----------------------------------------------------------------------|
  522.  3   |                           Parameter List Length                       |
  523. -----|-----------------------------------------------------------------------|
  524.  4   |                           Parameter List Length (LSB)                 |
  525. -----|-----------------------------------------------------------------------|
  526.  5   | Vendor Unique   |         Reserved                  |  Flag  |  Link  |
  527. ==============================================================================
  528.  
  529.   The COPY command (Table 7-12) provides a means to copy data from one logical 
  530. unit to another or the same logical unit.  The logical units may reside on the 
  531. same SCSI device or different SCSI devices.  Some SCSI devices that implement 
  532. this command may not support copies to or from another SCSI device or third 
  533.  
  534. party copies (both logical units reside on other SCSI devices).
  535.  
  536.   The parameter list length specifies the length in bytes of the parameters 
  537. that shall be sent during the DATA OUT phase of the command.  A parameter list 
  538. length of zero indicates that no data shall be transferred.  This condition 
  539. shall not be considered as an error.
  540.  
  541.   The COPY parameter list (Table 7-13) begins with a four-byte header that 
  542. contains the COPY function code and priority.  Following the header is one or 
  543. more segment descriptors.
  544.  
  545.                                   Table 7-13
  546.                              COPY Parameter List
  547.  
  548. ==============================================================================
  549.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  550. Byte |        |        |        |        |        |        |        |        |
  551. ==============================================================================
  552.  0   |         COPY Function Code                 |         Priority         |
  553. -----|-----------------------------------------------------------------------|
  554.  1   |                           Vendor Unique                               |
  555. -----|-----------------------------------------------------------------------|
  556.  2   |                           Reserved                                    |
  557. -----|-----------------------------------------------------------------------|
  558.  3   |                           Reserved                                    |
  559. ==============================================================================
  560.      |                         Segment Descriptor(s)                         |
  561. ==============================================================================
  562.  0 _ |                           Segment Descriptor 0                        |
  563.  xx  |                     (See specific table for length.)                  |
  564. -----|-----------------------------------------------------------------------|
  565.      |                                 .                                     |
  566.      |                                 .                                     |
  567.      |                                 .                                     |
  568. -----|-----------------------------------------------------------------------|
  569.  0 _ |                           Segment Descriptor n                        |
  570.  xx  |                     (See specific table for length.)                  |
  571. ==============================================================================
  572.  
  573.   The COPY function code defines a specific format for the segment 
  574. descriptors.  The COPY function codes are defined in Table 7-14.
  575.  
  576.   The priority field of the COPY parameter list establishes the relative 
  577. priority of this COPY command to other commands being executed by the same 
  578. target.  All other commands are assumed to have a priority of 1.  Priority0 
  579. is the highest priority with increasing values indicating lower priorities.
  580.  
  581.   The segment descriptor formats are determined by the COPY function code. 
  582. The segment descriptor format used for write-once read-multiple devices and 
  583. for read-only direct-access devices shall be the same as for direct-access 
  584. devices.  The segment descriptor format used for printer devices and for 
  585. processor devices shall be the same as for sequential-access devices.  Thus a 
  586. COPY from a write-once read-multiple device to a printer device uses the same 
  587. segment descriptor format as for a COPY from a direct-access device to a 
  588. sequential-access device.  (See Table 7-14.)  The segment descriptor formats 
  589. are described in Tables 7-15 through 7-17.  A maximum of 256 segment 
  590.  
  591. descriptors are permitted.  The segment descriptors are identified by 
  592. ascending numbers beginning with zero.
  593.  
  594.  
  595.                                   Table 7-14
  596.                                 COPY Functions
  597.  
  598. ==============================================================================
  599. Peripheral Device Type     COPY      Segment
  600. ----------------------   Function   Descriptor
  601. Source     Destination     Code       Table               Comment
  602. ------------------------------------------------------------------------------
  603.  00H           01H         00H      Table 7-15
  604.  00H           02H         00H      Table 7-15
  605.  00H           03H         00H      Table 7-15
  606.  04H           01H         00H      Table 7-15          Direct Access
  607.  04H           02H         00H      Table 7-15               to
  608.  04H           03H         00H      Table 7-15        Sequential Access
  609.  05H           01H         00H      Table 7-15
  610.  05H           02H         00H      Table 7-15
  611.  05H           03H         00H      Table 7-15
  612.  
  613.  01H           00H         01H      Table 7-15        Sequential Access
  614.  01H           04H         01H      Table 7-15               to
  615.  03H           00H         01H      Table 7-15          Direct Access
  616.  03H           04H         01H      Table 7-15
  617.  
  618.  00H           00H         02H      Table 7-16
  619.  00H           04H         02H      Table 7-16          Direct Access
  620.  04H           00H         02H      Table 7-16               to
  621.  04H           04H         02H      Table 7-16          Direct Access
  622.  05H           00H         02H      Table 7-16
  623.  05H           04H         02H      Table 7-16
  624.  
  625.  01H           01H         03H      Table 7-17
  626.  01H           02H         03H      Table 7-17        Sequential Access
  627.  01H           03H         03H      Table 7-17               to
  628.  03H           01H         03H      Table 7-17        Sequential Access
  629.  03H           02H         03H      Table 7-17
  630.  03H           03H         03H      Table 7-17
  631. ==============================================================================
  632.  
  633. Peripheral device type:  00H  Direct-access device
  634.                          01H  Sequential-access device
  635.                          02H  Printer device
  636.                          03H  Processor device
  637.                          04H  Write-once read-multiple device
  638.                          05H  Read-only direct-access device
  639.  
  640. COPY function code:  00H        Direct access to sequential access
  641.                      01H        Sequential access to direct access
  642.                      02H        Direct access to direct access
  643.                      03H        Sequential access to sequential access
  644.                      04H _ 0FH  Reserved
  645.                      10H _ 1FH  Vendor unique
  646. .pa
  647.  
  648.      7.1.4.1 Errors Detected by the Managing SCSI Device.  Two classes of 
  649. unusual conditions may occur during execution of a COPY command.  The first 
  650. class consists of those unusual conditions detected by the SCSI device that 
  651. received the COPY command and is managing the execution of the command.  These 
  652. conditions include parity errors while transferring the COPY command and 
  653. status byte, invalid parameters in the COPY command, invalid segment 
  654. descriptors, and inability of the SCSI device controlling the COPY functions 
  655. to continue operating.  In the event of such an unusual condition, the SCSI 
  656. device managing the COPY shall:
  657.  
  658.   (1) Terminate the COPY command with a CHECK CONDITION status.
  659.  
  660.   (2) Return the sense data in the extended sense format.  The valid bit shall 
  661. be set to one.  The segment number shall contain the number of the segment 
  662. descriptor being processed at the time the unusual condition is detected.  The 
  663. sense key shall contain the sense key code describing the unusual condition.  
  664. The information bytes shall contain the difference between the number of 
  665. blocks field in the segment descriptor being processed at the time of the 
  666. failure and the number of blocks successfully copied.  This number is the 
  667. residue of unprocessed blocks remaining for the segment descriptor.
  668.  
  669.      7.1.4.2 Errors Detected by a Target.  The second class of errors consists 
  670. of unusual conditions detected by the SCSI device transferring data at the 
  671. request of the SCSI device managing the transfer.  The SCSI device managing 
  672. the COPY command detects unusual conditions by receiving a CHECK CONDITION 
  673. status from one of the SCSI devices it is managing.  It then shall recover the 
  674. sense data associated with the unusual condition.
  675.  
  676.   The SCSI device managing the COPY command may also be the source or 
  677. destination SCSI device (or both).  It shall distinguish between a failure of 
  678. the management of the COPY and a failure of the data transfer being requested.  
  679. It shall then create the appropriate sense data internally.
  680.  
  681.   After recovering the sense data associated with the detected error, the SCSI 
  682. device managing the COPY command shall:
  683.  
  684.   (1) Terminate the COPY command with a CHECK CONDITION status.
  685.  
  686.   (2) Return the sense data in the extended sense format.  The valid bit shall 
  687. be set to one.  The segment number shall contain the number of the segment 
  688. descriptor being processed at the time the unusual condition is detected.  The 
  689. sense key shall be set to COPY ABORTED.  The information bytes shall contain 
  690. the difference between the number of blocks field in the segment descriptor 
  691. being processed at the time of the failure and the number of blocks 
  692. successfully copied.  This number is the residue of unprocessed blocks 
  693. remaining for the segment descriptor.  The additional sense length shall 
  694. specify the number of additional sense bytes.
  695.  
  696.   The first additional sense byte shall specify the byte number, relative to 
  697. the first byte of sense data of the beginning of the source logical unit's 
  698. status byte and sense data.  A zero value indicates that no status byte or 
  699. sense data is being returned for the source logical unit.  The first byte of 
  700. the area pointed to by the first additional sense byte shall contain the 
  701. status byte from the source logical unit.  The subsequent bytes shall contain, 
  702. unchanged, the sense data recovered from the source logical unit.
  703.  
  704.  
  705.   The second additional sense byte shall specify the byte number, relative to 
  706. the first byte of sense data of the beginning of the destination logical 
  707. unit's status byte and sense data.  A zero value indicates that no status byte 
  708. or sense data is being returned for the destination logical unit.  The first 
  709. byte of the area pointed to by the second additional sense byte shall contain 
  710. the status byte from the destination logical unit.  The subsequent bytes shall 
  711. contain, unchanged, the sense data recovered from the destination logical 
  712. unit.
  713.  
  714.      7.1.4.3 COPY Function Code 00H and 01H.  The format for the segment 
  715. descriptors for COPY transfers between direct-access and sequential-access 
  716. devices is specified in Table 7-15.  This format is required for COPY function 
  717. codes 00H or 01H.  The segment descriptor may be repeated up to 256 times 
  718. within the parameter list length specified in the command descriptor block.
  719.  
  720.  
  721.                                   Table 7-15
  722.             Segment Descriptor for COPY Function Codes 00H and 01H
  723.  
  724. ==============================================================================
  725.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  726. Byte |        |        |        |        |        |        |        |        |
  727. ==============================================================================
  728.  0   | Source Address           |   Reserved      | Source LUN               |
  729. -----|-----------------------------------------------------------------------|
  730.  1   | Destination Address      |   Reserved      | Destination LUN          |
  731. -----|-----------------------------------------------------------------------|
  732.  2   |           Sequential-Access Device Block-Length (MSB)                 | 
  733. -----|-----------------------------------------------------------------------|
  734.  3   |           Sequential-Access Device Block-Length (LSB)                 |
  735. -----|-----------------------------------------------------------------------|
  736.  4   |           Direct-Access Device Number of Blocks (MSB)                 |
  737. -----|-----------------------------------------------------------------------|
  738.  5   |           Direct-Access Device Number of Blocks                       |
  739. -----|-----------------------------------------------------------------------|
  740.  6   |           Direct-Access Device Number of Blocks                       |
  741. -----|-----------------------------------------------------------------------|
  742.  7   |           Direct-Access Device Number of Blocks (LSB)                 |
  743. -----|-----------------------------------------------------------------------|
  744.  8   |           Direct-Access Device Logical Block Address (MSB)            |
  745. -----|-----------------------------------------------------------------------|
  746.  9   |           Direct-Access Device Logical Block Address                  |
  747. -----|-----------------------------------------------------------------------|
  748. 10   |           Direct-Access Device Logical Block Address                  |
  749. -----|-----------------------------------------------------------------------|
  750. 11   |           Direct-Access Device Logical Block Address (LSB)            |
  751. ==============================================================================
  752.  
  753.   Source address and destination address fields specify the SCSI devices and 
  754. the source LUN and destination LUN fields specify the logical units to use for 
  755. this segment of the COPY command.  Some SCSI devices may not support "third-
  756. party" COPY in which the copying SCSI device is not the source or destination 
  757. device.  Some SCSI devices only support COPY within the SCSI device and not to 
  758. other SCSI devices.  If an unsupported COPY operation is requested, the 
  759. command shall be terminated with a CHECK CONDITION status and the sense key 
  760. shall be set to ILLEGAL REQUEST.
  761.  
  762.  
  763.   The sequential-access device block-length field specifies the block-length 
  764. to be used on the sequential-access logical unit during this segment of the 
  765. COPY command.  If this block-length is known by the SCSI device managing the 
  766. COPY to be not supported, the command shall be terminated with a CHECK 
  767. CONDITION status and the sense key shall be set to ILLEGAL REQUEST.  If the 
  768. block-length is found to be invalid while executing a read or write operation 
  769. to the sequential-access device, the command shall be terminated with a CHECK 
  770. CONDITION status and the sense key shall be set to COPY ABORTED.
  771.  
  772.   The direct-access device number of blocks field specifies the number of 
  773. blocks in the current segment.  A value of zero indicates that no blocks shall 
  774. be transferred in this segment.  The direct-access device logical block 
  775. address specifies the starting logical block address on the logical unit for 
  776. this segment.
  777.  
  778.      7.1.4.4 COPY Function Code 02H.  The format for the segment descriptors 
  779. for COPY transfers among direct-access devices is specified by Table 7-16.  
  780. This format is required for COPY function code 02H.  The segment descriptor 
  781. may be repeated up to 256 times within the parameter list length specified in 
  782. the command descriptor block.
  783. .pa
  784.  
  785.                                   Table 7-16
  786.                 Segment Descriptor for COPY Function Code 02H
  787.  
  788. ==============================================================================
  789.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  790. Byte |        |        |        |        |        |        |        |        |
  791. ==============================================================================
  792.  0   | Source Address           |   Reserved      | Source LUN               |
  793. -----|-----------------------------------------------------------------------|
  794.  1   | Destination Address      |   Reserved      | Destination LUN          |
  795. -----|-----------------------------------------------------------------------|
  796.  2   |                              Reserved                                 |
  797. -----|-----------------------------------------------------------------------|
  798.  3   |                              Reserved                                 |
  799. -----|-----------------------------------------------------------------------|
  800.  4   |                   Source Number of Blocks (MSB)                       |
  801. -----|-----------------------------------------------------------------------|
  802.  5   |                   Source Number of Blocks                             |
  803. -----|-----------------------------------------------------------------------|
  804.  6   |                   Source Number of Blocks                             |
  805. -----|-----------------------------------------------------------------------|
  806.  7   |                   Source Number of Blocks (LSB)                       |
  807. -----|-----------------------------------------------------------------------|
  808.  8   |                   Source Logical Block Address (MSB)                  |
  809. -----|-----------------------------------------------------------------------|
  810.  9   |                   Source Logical Block Address                        |
  811. -----|-----------------------------------------------------------------------|
  812. 10   |                   Source Logical Block Address                        |
  813. -----|-----------------------------------------------------------------------|
  814. 11   |                   Source Logical Block Address (LSB)                  |
  815. -----|-----------------------------------------------------------------------|
  816. 12   |              Destination Logical Block Address (MSB)                  |
  817. -----|-----------------------------------------------------------------------|
  818. 13   |              Destination Logical Block Address                        |
  819. -----|-----------------------------------------------------------------------|
  820. 14   |              Destination Logical Block Address                        |
  821. -----|-----------------------------------------------------------------------|
  822. 15   |              Destination Logical Block Address (LSB)                  |
  823. ==============================================================================
  824.  
  825.   The source address and destination address fields specify the SCSI devices 
  826. and the source LUN and destination LUN specify the logical units to use for 
  827. this segment of the COPY command.  Some SCSI devices may not support "third-
  828. party" COPY in which the copying SCSI device is not the source or destination 
  829. device.  Some SCSI devices only support COPY within the SCSI device and not to 
  830. other SCSI devices.  If an unsupported COPY operation is requested, the 
  831. command shall be terminated with a CHECK CONDITION status and the sense key 
  832. shall be set to ILLEGAL REQUEST.
  833.  
  834.   The source number of blocks field specifies the number of blocks to be 
  835. transferred from the source device during command execution.  The source 
  836. logical block address field specifies the starting logical block address on 
  837. the source device.   The destination logical block address field specifies the 
  838. starting logical block address on the destination device.
  839. .pa
  840.  
  841.      7.1.4.5 COPY Function Code 03H.  The format for the segment descriptors 
  842. for COPY transfers among sequential-access devices is specified by Table 7-17.  
  843. This format is required for COPY function code 03H.  The segment descriptor 
  844. may be repeated up to 256 times within the parameter list length specified in 
  845. the command descriptor block.
  846.  
  847.                                   Table 7-17
  848.                 Segment Descriptor for COPY Function Code 03H
  849.  
  850. ==============================================================================
  851.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  852. Byte |        |        |        |        |        |        |        |        |
  853. ==============================================================================
  854.  0   | Source Address           |   Reserved      | Source LUN               |
  855. -----|-----------------------------------------------------------------------|
  856.  1   | Destination Address      |   Reserved      | Destination LUN          |
  857. -----|-----------------------------------------------------------------------|
  858.  2   |                              Reserved                                 |
  859. -----|-----------------------------------------------------------------------|
  860.  3   |                              Reserved                                 |
  861. -----|-----------------------------------------------------------------------|
  862.  4   |                           Source Block Length (MSB)                   |
  863. -----|-----------------------------------------------------------------------|
  864.  5   |                           Source Block Length (LSB)                   |
  865. -----|-----------------------------------------------------------------------|
  866.  6   |                           Destination Block Length (MSB)              |
  867. -----|-----------------------------------------------------------------------|
  868.  7   |                           Destination Block Length (LSB)              |
  869. -----|-----------------------------------------------------------------------|
  870.  8   |                           Source Number of Blocks (MSB)               |
  871. -----|-----------------------------------------------------------------------|
  872.  9   |                           Source Number of Blocks                     |
  873. -----|-----------------------------------------------------------------------|
  874. 10   |                           Source Number of Blocks                     |
  875. -----|-----------------------------------------------------------------------|
  876. 11   |                           Source Number of Blocks (LSB)               |
  877. ==============================================================================
  878.  
  879.   Source address and destination address fields specify the SCSI devices and 
  880. the source LUN and destination LUN fields specify the logical units to use for 
  881. this segment of the COPY command.  Some SCSI devices may not support "third-
  882. party" COPY in which the copying SCSI device is not the source or destination 
  883. device.  Some SCSI devices only support COPY within the SCSI device and not to 
  884. other SCSI devices.  If an unsupported COPY operation is requested, the 
  885. command shall be terminated with a CHECK CONDITION status and the sense key 
  886. shall be set to ILLEGAL REQUEST.
  887.  
  888.   The source block-length field specifies the block-length of the source 
  889. device for this segment of the COPY.  A zero in this field indicates variable 
  890. block-length.  For nonzero values, this field shall match the logical unit's 
  891. actual block-length.  If block-length mismatches are detected by the SCSI 
  892. device managing the COPY, the command shall be terminated with a CHECK 
  893. CONDITION status and the sense key shall be set to ILLEGAL REQUEST.  If the 
  894. mismatches are detected during the read operation by the COPY manager, the 
  895. command shall be terminated with a CHECK CONDITION status and the sense key 
  896. shall be set to COPY ABORTED.
  897.  
  898.  
  899.   The destination block-length field specifies the block-length to be used on 
  900. the destination logical unit during the COPY.  Destination block-length 
  901. mismatches are handled in the same manner as source block-length mismatches.
  902.  
  903.   The source number of blocks field specifies the number of blocks to be 
  904. transferred from the source device during this segment.  A value of zero 
  905. indicates that no blocks shall be transferred.
  906.  
  907.   7.1.5 RECEIVE DIAGNOSTIC RESULTS Command
  908.  
  909.      Peripheral Device Type:  All
  910.         Operation Code Type:  Optional
  911.              Operation Code:  1CH
  912.  
  913.                                   Table 7-18
  914.                       RECEIVE DIAGNOSTIC RESULTS Command
  915.  
  916. ==============================================================================
  917.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  918. Byte |        |        |        |        |        |        |        |        |
  919. ==============================================================================
  920.  0   |                           Operation Code                              | 
  921. -----|-----------------------------------------------------------------------|
  922.  1   | Logical Unit Number      |                  Reserved                  |
  923. -----|-----------------------------------------------------------------------|
  924.  2   |                           Reserved                                    |
  925. -----|-----------------------------------------------------------------------|
  926.  3   |                           Allocation Length (MSB)                     |
  927. -----|-----------------------------------------------------------------------|
  928.  4   |                           Allocation Length (LSB)                     |
  929. -----|-----------------------------------------------------------------------|
  930.  5   | Vendor Unique   |         Reserved                  |  Flag  |  Link  |
  931. ==============================================================================
  932.  
  933.   The RECEIVE DIAGNOSTIC RESULTS command (Table 7-18) requests analysis data 
  934. be sent to the initiator after completion of a SEND DIAGNOSTIC command (see 
  935. 7.1.6).
  936.  
  937.   The allocation length shall specify the number of bytes that the initiator 
  938. has allocated for returned diagnostic data.  An allocation length of zero 
  939. indicates that no diagnostic data shall be transferred.  Any other value 
  940. indicates the maximum number of bytes that shall be transferred.  The target 
  941. terminates the DATA IN phase when allocation length bytes have been 
  942. transferred or when all available diagnostic data have been transferred to the 
  943. initiator, whichever is less.
  944.  
  945.   The diagnostic data returned is vendor unique.
  946.  
  947. NOTE:  Although diagnostic software is generally device-specific, this command 
  948. and the SEND DIAGNOSTIC command provide a means to isolate the operating 
  949. system software from the device-specific diagnostic software.  Hence the 
  950. operating system can remain device-independent.  This also allows diagnostic 
  951. software to be more easily ported to other operating systems.
  952. .pa
  953.  
  954.   7.1.6 SEND DIAGNOSTIC Command
  955.  
  956.      Peripheral Device Type:  All
  957.         Operation Code Type:  Optional
  958.              Operation Code:  1DH
  959.  
  960.                                   Table 7-19
  961.                            SEND DIAGNOSTIC Command
  962.  
  963. ==============================================================================
  964.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  965. Byte |        |        |        |        |        |        |        |        |
  966. ==============================================================================
  967.  0   |                           Operation Code                              | 
  968. -----|-----------------------------------------------------------------------|
  969.  1   | Logical Unit Number      |      Reserved   |SelfTest| DevOfL | UnitOfL|
  970. -----|-----------------------------------------------------------------------|
  971.  2   |                           Reserved                                    |
  972. -----|-----------------------------------------------------------------------|
  973.  3   |                           Parameter List Length (MSB)                 |
  974. -----|-----------------------------------------------------------------------|
  975.  4   |                           Parameter List Length (LSB)                 |
  976. -----|-----------------------------------------------------------------------|
  977.  5   | Vendor Unique   |         Reserved                  |  Flag  |  Link  |
  978. ==============================================================================
  979.  
  980.   The SEND DIAGNOSTIC command (Table 7-19) requests the target to perform 
  981. diagnostic tests on itself, on the attached peripheral devices, or on both.  
  982. This command is usually followed by a RECEIVE DIAGNOSTIC RESULTS command, 
  983. except when the self test (SelfTest) bit is one.
  984.  
  985.   The parameter list length specifies the length in bytes of the parameter 
  986. list that shall be transferred during the DATA OUT phase.  A parameter list 
  987. length of zero indicates that no data shall be transferred.  This condition 
  988. shall not be considered as an error.  The parameter list is vendor unique.
  989.  
  990.   A logical unit off-line (UnitOfL) bit of one enables write operations on 
  991. user medium or operations that affect user visible medium positioning.  An 
  992. SCSI device off-line (DevOfL) bit of one enables diagnostic operations that 
  993. may adversely affect operations to other logical units on the same target.
  994.  
  995.   The logical unit off-line and SCSI device off-line bits are generally set by 
  996. operating system software, while the parameter list is prepared by diagnostic 
  997. application software.  Thus, by preventing operations that are not enabled by 
  998. these bits, the target assists the operating system in protecting its 
  999. resources.
  1000.  
  1001.   A self test bit of one directs the target to complete its default self test.  
  1002. If the self test is requested, the parameter list length shall be set to zero 
  1003. and no data shall be transferred.  If the self test successfully passes, the 
  1004. command shall be terminated with a GOOD status; otherwise, the command shall 
  1005. be terminated with a CHECK CONDITION status and, if extended sense is 
  1006. implemented, the sense key shall be set to HARDWARE ERROR.
  1007.  
  1008. NOTE: See the note under the RECEIVE DIAGNOSTIC RESULTS command (7.1.5).
  1009. .pa
  1010.  
  1011. 7.2 Group 1 Commands for All Device Types.  These commands shall be as listed 
  1012. in Table 7-20.
  1013.  
  1014.                                   Table 7-20
  1015.                     Group 1 Commands for All Device Types
  1016.  
  1017. ==============================================================================
  1018. Operation
  1019.   Code      Type   Command Name                       Section
  1020. ------------------------------------------------------------------------------
  1021.    20H       V
  1022.    21H       V
  1023.    22H       V
  1024.    23H       V
  1025.    24H       V
  1026.    25H       *
  1027.    26H       V
  1028.    27H       V
  1029.    28H       *
  1030.    29H       V
  1031.    2AH       *
  1032.    2BH       *
  1033.    2CH       V
  1034.    2DH       V
  1035.    2EH       *
  1036.    2FH       *
  1037.    30H       *
  1038.    31H       *
  1039.    32H       *
  1040.    33H       *
  1041.    34H       R
  1042.    35H       R
  1043.    36H       R
  1044.    37H       R
  1045.    38H       R
  1046.    39H       O     COMPARE                            7.2.1
  1047.    3AH       O     COPY AND VERIFY                    7.2.2
  1048.    3BH       R
  1049.    3CH       R
  1050.    3DH       R
  1051.    3EH       R
  1052.    3FH       R
  1053. ==============================================================================
  1054.  
  1055. Key: O  =  Command implementation is optional.
  1056.      R  =  Operation code is reserved for future standardization.
  1057.      V  =  Operation code is available for vendor unique commands.
  1058.      *  =  These operation codes may have different meanings for specific 
  1059.            types of peripheral devices.  (See the appropriate section for 
  1060.            further information.)
  1061. .pa
  1062.  
  1063.   7.2.1 COMPARE Command
  1064.  
  1065.      Peripheral Device Type:  All
  1066.         Operation Code Type:  Optional
  1067.              Operation Code:  39H
  1068.  
  1069.                                   Table 7-21
  1070.                                COMPARE Command
  1071.  
  1072. ==============================================================================
  1073.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  1074. Byte |        |        |        |        |        |        |        |        |
  1075. ==============================================================================
  1076.  0   |                           Operation Code                              | 
  1077. -----|-----------------------------------------------------------------------|
  1078.  1   | Logical Unit Number      |                   Reserved                 |
  1079. -----|-----------------------------------------------------------------------|
  1080.  2   |                           Reserved                                    |
  1081. -----|-----------------------------------------------------------------------|
  1082.  3   |                           Parameter List Length (MSB)                 |
  1083. -----|-----------------------------------------------------------------------|
  1084.  4   |                           Parameter List Length                       |
  1085. -----|-----------------------------------------------------------------------|
  1086.  5   |                           Parameter List Length (LSB)                 |
  1087. -----|-----------------------------------------------------------------------|
  1088.  6   |                           Reserved                                    |
  1089. -----|-----------------------------------------------------------------------|
  1090.  7   |                           Reserved                                    |
  1091. -----|-----------------------------------------------------------------------|
  1092.  8   |                           Reserved                                    |
  1093. -----|-----------------------------------------------------------------------|
  1094.  9   | Vendor Unique   |         Reserved                  |  Flag  |  Link  |
  1095. ==============================================================================
  1096.  
  1097.   The COMPARE command (Table 7-21) provides the means to compare data from one 
  1098. logical unit with another or the same logical unit in a manner similar to the 
  1099. COPY command. 
  1100.  
  1101.   This command functions in the same manner as the COPY command, except that 
  1102. the data from the source is compared on a byte-by-byte basis with the data 
  1103. >From the destination.  The parameter list transferred to the target is the 
  1104. same as for the COPY command.  This parameter list contains the information to 
  1105. identify the logical units involved in the comparison and the length of the 
  1106. comparison.  (See 7.1.4 for additional information about the COPY command.)
  1107.  
  1108.   If the comparison is unsuccessful, the command shall be terminated with a 
  1109. CHECK CONDITION status and the sense key shall be set to MISCOMPARE.  The 
  1110. remaining fields in the extended sense shall be set as documented in the COPY 
  1111. command.
  1112. .pa
  1113.  
  1114.   7.2.2 COPY AND VERIFY Command
  1115.  
  1116.      Peripheral Device Type:  All
  1117.         Operation Code Type:  Optional
  1118.              Operation Code:  3AH
  1119.  
  1120.                                   Table 7-22
  1121.                            COPY AND VERIFY Command
  1122.  
  1123. ==============================================================================
  1124.   Bit|   7    |   6    |   5    |   4    |   3    |   2    |   1    |   0    | 
  1125. Byte |        |        |        |        |        |        |        |        |
  1126. ==============================================================================
  1127.  0   |                           Operation Code                              | 
  1128. -----|-----------------------------------------------------------------------|
  1129.  1   | Logical Unit Number      |        Reserved          | BytChk |Reserved|
  1130. -----|-----------------------------------------------------------------------|
  1131.  2   |                           Reserved                                    |
  1132. -----|-----------------------------------------------------------------------|
  1133.  3   |                           Parameter List Length (MSB)                 |
  1134. -----|-----------------------------------------------------------------------|
  1135.  4   |                           Parameter List Length                       |
  1136. -----|-----------------------------------------------------------------------|
  1137.  5   |                           Parameter List Length (LSB)                 |
  1138. -----|-----------------------------------------------------------------------|
  1139.  6   |                           Reserved                                    |
  1140. -----|-----------------------------------------------------------------------|
  1141.  7   |                           Reserved                                    |
  1142. -----|-----------------------------------------------------------------------|
  1143.  8   |                           Reserved                                    |
  1144. -----|-----------------------------------------------------------------------|
  1145.  9   | Vendor Unique   |         Reserved                  |  Flag  |  Link  |
  1146. ==============================================================================
  1147.  
  1148.   The COPY AND VERIFY command (Table 7-22) performs the same function as the 
  1149. COPY command, except that a verification of the data written to the 
  1150. destination logical unit is performed after the data is written.  The 
  1151. parameter list transferred to the target is the same as for the COPY command.  
  1152. This parameter list contains the information to identify the logical units 
  1153. involved in the copy and the length of the copy.  (See 7.1.4 for additional 
  1154. information about the COPY command.)
  1155.  
  1156.   A byte check (BytChk) bit of zero causes the verification to be simply a 
  1157. medium verification (CRC, ECC, etc).  A BytChk bit of one causes a byte-by-
  1158. byte comparison of data written to the destination logical unit and the data 
  1159. read from the source logical unit.
  1160.  
  1161.   If the comparison is unsuccessful, the command shall be terminated with a 
  1162. CHECK CONDITION status and the sense key shall be set to MISCOMPARE.  The 
  1163. remaining fields in the extended sense shall be set as documented in the COPY 
  1164. command.
  1165. .pa
  1166.  
  1167. 7.3 Group 2 Commands for All Device Types.  The Group 2 commands (operation 
  1168. codes 40H through 5FH) are all reserved for future standardization.
  1169.  
  1170. 7.4 Group 3 Commands for All Device Types.  The Group 3 commands (operation 
  1171. codes 60H through 7FH) are all reserved for future standardization.
  1172.  
  1173. 7.5 Group 4 Commands for All Device Types.  The Group 4 commands (operation 
  1174. codes 80H through 9FH) are all reserved for future standardization.
  1175.  
  1176. 7.6 Group 5 Commands for All Device Types.  The Group 5 commands with 
  1177. operation codes A0H through AFH are vendor unique.  The Group 5 commands with 
  1178. operation codes B0H through BFH are reserved for future standardization.
  1179.  
  1180. 7.7 Group 6 Commands for All Device Types.  The Group 6 commands (operation 
  1181. codes C0H through DFH) are all vendor unique.
  1182.  
  1183. 7.8 Group 7 Commands for All Device Types.  The Group 7 commands (operation 
  1184. codes E0H through FFH) are all vendor unique.
  1185. .pa
  1186.  
  1187. 
  1188.  
  1189.